package com.kjtpay.design_pattern.chain;

/**
 * 管理者基类；Handler
 */
abstract class Manager {
    protected String name;
    // 管理者的上级
    protected Manager superior;
    protected String log;

    public Manager(String name) {
        this.name = name;
    }

    // 设置管理者的上级
    public void setSuperior(Manager superior) {
        this.superior = superior;
    }

    // 展示操作
    public String show() {
        return log;
    }

    // 重置操作
    public void reset() {
        log = null;
    }

    // 处理请求
    public abstract void requestApplication(Request request);
}
